<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <?php $this->load->view('head'); ?>
        <link type="text/css" href="<?php echo base_url() . "css/redmond/jquery-ui-1.8.14.custom.css"; ?>" rel="stylesheet" />
        <link type="text/css" href="<?php echo base_url() . "css/estadisticas.css"; ?>" rel="stylesheet" />
        <script src="<?php echo base_url() . "js/jquery-ui-1.8.14.custom.min.js"; ?>" type="text/javascript"></script>
        <title></title>
        <script src="<?php echo base_url() . "js/raphael.js"; ?>" type="text/javascript" charset="utf-8"></script>
        <script src="<?php echo base_url() . "js/g.raphael.js"; ?>" type="text/javascript" charset="utf-8"></script>
        <script src="<?php echo base_url() . "js/g.pie.js"; ?>" type="text/javascript" charset="utf-8"></script>
        <script type="text/javascript">
            $(document).ready(function(){
                $('#divEstadistica').load('<?php echo site_url("registrarInst/llamaEstPersContra/"); ?>');
<?php $this->load->view('enReady'); ?>
                    }); //fin $(document).ready(function(){
                    function fnAbreDetalle(opc){
                        window.open("<?php echo site_url("registrarInst/abreDetalle/") . "/"; ?>" + opc, "Detalle", "width=1300,height=500,scrollbars=YES");
                    }
        </script>
    </head>
    <body>
        <div class="divTitulo" style="margin-bottom: 10px">Afiliados contratados</div>
        <div id="divEstadistica" ></div>
        <div id="divEstadistica1" >
            <?php if ($this->session->userdata("rolId") == "1") { ?>
                <label for="institucion">Instituciones</label>
                <select id="institucion" name="institucion" title="Filtre por una institución en especifico">
                    <option value="">Todas</option>
                    <?php
                    foreach ($instituciones->result() as $row)
                        echo "<option value='{$row->institucionId}'>{$row->institucionRazon}</option>";
                    ?>
                </select><br/>
<?php } ?>                
            <input type="button" value="Recalcular" onclick="$('#holder').html('');$('#divEstadistica').load('<?php echo site_url("registrarInst/llamaEstPersContra/"); ?>' + '/perContra/' + $('#institucion').val());" />
        </div>
        <div id="holder"></div>
    </body>
</html>
